<!DOCTYPE html>
<html class="x-admin-sm" lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>个人资料</title>
    <header th:replace="header::html"></header>
    <link th:href="@{/css/personal.css}" rel="stylesheet" type="text/css">

</head>

<body>
<div style="width: 100%;height: 10px;background-color: white"></div>

<div class="perTitle">
    <img alt="加载失败" th:src="@{/images/1314520.png}">
    <span>基本信息</span>
</div>
<div id="basicInfo">
    <div id="editPoneDiv" style="cursor: pointer; background-color: white;">
        <span class="point"></span>
        <span class="col1">手机号</span>
        <span class="col2" th:text="${#authentication.principal.uphone}">
        </span>
        <span id="editPone" style="display: none;">修改手机号<span>&gt;&gt;</span></span>
    </div>
    <div style="background-color: rgb(241, 241, 241);" >
        <span class="point"></span>
        <span class="col1">昵称</span>
        <span class="col2" th:text="${#authentication.principal.uname}">
        </span>
    </div>
    <div style="cursor: pointer; background-color: white;">
        <span class="point"></span>
        <span class="col1">账号</span>
        <span class="col2" th:text="${#authentication.principal.uaccount}">
        </span>
    </div>
    <div style="background-color: rgb(241, 241, 241);">
        <span class="point"></span>
        <span class="col1">地址</span>
        <span class="col2" th:text="${#authentication.principal.uaddress}">
        </span>
    </div>
    <div style="cursor: pointer; background-color: white;">
        <span class="point" ></span>
        <span class="col1">性别</span>
        <span class="col2" th:text="${#authentication.principal.usex}">
        </span>
    </div>
    <div style="background-color: rgb(241, 241, 241);" >
        <span class="point"></span>
        <span class="col1">个人介绍</span>
        <span class="col2" th:text="${#authentication.principal.ustory}">
        </span>
    </div>
</div>
<div class="perTitle" >
    <img alt="加载失败" th:src="@{/images/u17193.png}">
    <span>资金及信用</span>
</div>
<div id="checkInfo">
    <div style="cursor: pointer; background-color: white;">
        <span class="point"></span>
        <span class="col1">信用分</span>
        <span class="col2" id="uscoreMy" >
        </span>
        <span id="checkSignIn" onclick="xadmin.open('我的信用守约明细','/api-front/credit/myCredit')">查看信用分<span>&gt;&gt;</span></span>
    </div>
    <div style="background-color: rgb(241, 241, 241);">
        <span class="point"></span>
        <span class="col1">账户余额</span>
        <span class="col2"  id="moneyMy" >
        </span>
        <span id="checkAction" onclick="xadmin.open('我的交易明细','/api-front/frontneed/myMoney')">查看交易明细<span>&gt;&gt;</span></span>
    </div>

</div>
<div class="perTitle">
    <img alt="加载失败" th:src="@{/images/u17244.png}">
    <span>账号信息</span>
</div>
<div id="accountInfo">
    <div style="cursor: pointer; background-color: white;">
        <span class="point"></span>
        <span class="col1">账号</span>
        <span class="col2" th:text="${#authentication.principal.uaccount}"></span>
    </div>
    <div id="editPassDiv" style="cursor: pointer; background-color: rgb(241, 241, 241);">
        <span class="point"></span>
        <span class="col1">密码</span>
        <span class="col2" >******</span>
        <span id="editPass" onclick="changePassword()">修改密码<span>&gt;&gt;</span></span>
    </div>
</div>
    

</body>
<script>
    function changePassword() {
	    xadmin.open('修改密码页面','/api-front/employer/myPass');
    }

    window.onload=function (ev) {
	    $.ajax({
		    type: "GET",
		    url: '/api-front/employer/getUserInfoByUaccount',
		    success: function (msg) {
			    document.getElementById("moneyMy").innerText=msg.umoney;
			    document.getElementById("uscoreMy").innerText=msg.uscore;
		    },
		    error: function () {
			    alert("服务器正忙.....");
		    }
	    });




    }



</script>
</html>